crDEVMODE

The crDEVMODE Structure is a Windows API structure that contains information about a printer driver's initialization and environment data. An application passes this structure to the DeviceCapabilities and ExtDeviceMode functions. It is used by the crPESelectPrinter and crPEGetSelectedPrinter functions.

Type crDEVMODE
dmDriverVersion As Integer
' printer driver version number (usually not required)
    dmFields As Long
'flags indicating fields to modify (required)
dmOrientation As Integer
dmPaperSize As Integer
dmPaperLength As Integer
dmPaperWidth As Integer
dmScale As Integer
dmCopies As Integer
dmDefaultSource As Integer
dmPrintQuality As Integer
dmColor As Integer
dmDuplex As Integer
dmYResolution As Integer
dmTTOption As Integer
End Type
Members

dmDriverVersion

Specifies the printer driver version number assigned by the printer driver developer.

dmFields

Specifies a set of flags that indicate which of the remaining members in the crDEVMODE structure have been initialized. It can be any combination (or it can be none) of the following values:

Constant Value

DM_ORIENTATION

&H1

DM_PAPERSIZE

&H2

DM_PAPERLENGTH

&H4

DM_PAPERWIDTH

&H8

DM_SCALE

&H10

DM_COPIES

&H100

DM_DEFAULTSOURCE

&H200

DM_PRINTQUALITY

&H400

DM_COLOR

&H800

DM_DUPLEX

&H1000

DM_YRESOLUTION

&H2000

DM_TTOPTION

&H4000

Note:    A printer driver supports only those members that are appropriate for the printer technology.

dmOrientation

Specifies the orientation of the paper. It can be either DMORIENT_PORTRAIT (1) or DMORIENT_LANDSCAPE (2).

dmPaperSize

Specifies the size of the paper to print on. This member may be set to zero if the length and width of the paper are specified by the dmPaperLength and dmPaperWidth members, respectively.

Note:    The PostScript driver mistakenly uses DM_PAPER_ values between 50 and 56. Don't use this range when defining paper sizes.

Otherwise, the dmPaperSize member can be set to one of the following predefined values:

Constant Description

DMPAPER_FIRST

DMPAPER_LETTER

DMPAPER_LETTER

Letter, 8 1/2 x 11 in.

DMPAPER_LETTERSMALL

Letter Small, 8 1/2 x 11 in.

DMPAPER_TABLOID

Tabloid, 11 x 17 in.

DMPAPER_LEDGER

Ledger, 17 x 11 in.

DMPAPER_LEGAL

Legal, 8 1/2 x 14 in.

DMPAPER_STATEMENT

Statement, 5 1/2 x 8 1/2 in.

DMPAPER_EXECUTIVE

Executive, 7 1/2 x 10 1/2 in.

DMPAPER_A3

A3, 297 x 420 mm

DMPAPER_A4

A4, 210 x 297 mm

DMPAPER_A4SMALL

A4 Small, 210 x 297 mm

DMPAPER_A5

A5, 148 x 210 mm

DMPAPER_B4

B4, 250 x 354 mm

DMPAPER_B5

B5, 182 x 257 mm

DMPAPER_FOLIO

Folio, 8 1/2 x 13 in.

DMPAPER_QUARTO

Quarto, 215 x 275 mm

DMPAPER_10X14

10 x 14 in.

DMPAPER_11X17

11 x 17 in.

DMPAPER_NOTE

Note, 8 1/2 x 11 in.

DMPAPER_ENV_9

Envelope #9, 3 7/8 x 8 7/8 in.

DMPAPER_ENV_10

Envelope #10, 4 1/8 x 9 1/2 in.

DMPAPER_ENV_11

Envelope #11, 4 1/2 x 10 3/8 in.

DMPAPER_ENV_12

Envelope #12, 4 1/2 x 11 in.

DMPAPER_ENV_14

Envelope #14, 5 x 11 1/2 in.

DMPAPER_CSHEET

C size sheet

DMPAPER_DSHEET

D size sheet

DMPAPER_ESHEET

E size sheet

DMPAPER_ENV_DL

Envelope DL, 110 x 220 mm

DMPAPER_ENV_C3

Envelope C3, 324 x 458 mm

DMPAPER_ENV_C4

Envelope C4, 229 x 324 mm

DMPAPER_ENV_C5

Envelope C5, 162 x 229 mm

DMPAPER_ENV_C6

Envelope C6, 114 x 162 mm

DMPAPER_ENV_C65

Envelope C65, 114 x 229 mm

DMPAPER_ENV_B4

Envelope B4, 250 x 353 mm

DMPAPER_ENV_B5

Envelope B5, 176 x 250 mm

DMPAPER_ENV_B6

Envelope B6, 176 x 125 mm

DMPAPER_ENV_ITALY

Envelope, 110 x 230 mm

DMPAPER_ENV_MONARCH

Envelope Monarch, 3 7/8 x 7 1/2 in.

DMPAPER_ENV_PERSONAL

Envelope, 3 5/8 x 6 1/2 in.

DMPAPER_FANFOLD_US

U.S. Standard Fanfold, 14 7/8 x 11 in.

DMPAPER_FANFOLD_STD_GERMAN

German Standard Fanfold, 8 1/2 x 12 in.

DMPAPER_FANFOLD_LGL_GERMAN

German Legal Fanfold, 8 1/2 x 13 in.

DMPAPER_LAST

German Legal Fanfold, 8 1/2 x 13 in.

DMPAPER_USER

User-defined

dmPaperLength

Specifies a paper length in tenths of a millimeter. This parameter overrides the paper length specified by the dmPaperSize member, either for custom paper sizes or for such devices as dot-matrix printers that can print on a variety of page sizes.

dmPaperWidth

Specifies a paper width in tenths of a millimeter. This parameter overrides the paper width specified by the dmPaperSize member.

dmScale

Specifies the factor by which the printed output is to be scaled. The apparent page size is scaled from the physical page size by a factor of dmScale/100. For example, a letter-size paper with a dmScale value of 50 would contain as much data as a page of size 17 by 22 inches because the output text and graphics would be half their original height and width.

dmCopies

Specifies the number of copies printed if the device supports multiple-page copies.

dmDefaultSource

Specifies the default bin from which the paper is fed. The application can override this value by using the GETSETPAPERBINS escape. This member can be one of the following values:

Constant Value

DMBIN_FIRST

1

DMBIN_UPPER

1

DBMIN_ONLYONE

1

DMBIN_LOWER

2

DMBIN_MIDDLE

3

DMBIN_MANUAL

4

DMBIN_ENVELOPE

5

DMBIN_ENVMANUAL

6

DBMIN_AUTO

7

DMBIN_TRACTOR

8

DMBIN_SMALLFMT

9

DMBIN_LARGEFMT

10

DMBIN_LARGECAPACITY

11

DMBIN_CASSETTE

14

DMBIN_LAST

DBIM_CASSETTE

Note:    A range of values is reserved for device-specific bins. To be consistent with initialization information, the GETSETPAPERBINS and ENUMPAPERBINS escapes use these values.

dmPrintQuality

Specifies the printer resolution. Following are the four predefined device-independent values:

Constant Value

DMRES_DRAFT

-1

DMRES_LOW

-2

DMRES_MEDIUM

-3

DMRES_HIGH

-4

Note:    If a positive value is given, it specifies the number of dots per inch (DPI) and is therefore device-dependent.

Note:    If the printer initializes the dmYResolution member, the dmPrintQuality member specifies the x-resolution of the printer, in dots per inch.

dmColor

Specifies whether color printer renders color or monochrome output. Possible values are:

Constant Value

DMCOLOR_MONOCHROME

1

DMCOLOR_COLOR

2

dmDuplex

Specifies duplex (double-sided) printing for printers capable of duplex printing. This member can be one of the following values:

Constant Value

DMDUP_SIMPLEX

1

DMDUP_ VERTICAL

2

DMDUP_ HORIZONTAL

3

dmYResolution

Specifies the y-resolution of the printer in dots per inch. If the printer initializes this member, the dmPrintQuality member specifies the x-resolution of the printer in dots per inch.

dmTTOption

Specifies how TrueType fonts should be printed. It can be one of the following values:

Constant Value

DMTT_BITMAP

Print TrueType fonts as graphics. This is the default action for dot-matrix printers.

DMTT_DOWNLOAD

Download TrueType fonts as soft fonts. This is the default action for Hewlett-Packard printers that use Printer Control Language (PCL).

DMTT_SUBDEV

Substitute device fonts for TrueType fonts. This is the default action for PostScript printers.

Remarks


Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com